package com.pai4j.pgc.dao.community;
import com.pai4j.pgc.entity.community.CCAnswerEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 *
 * @author: CYM-pai
 * @date: 2025/10/27 15:48
 **/
@Repository
public interface ICCAnswerDAO extends JpaSpecificationExecutor<CCAnswerEntity>, JpaRepository<CCAnswerEntity, Long> {


    List<CCAnswerEntity> findAllByQuestionIdAndDeletedOrderByIdDesc(Long questionId, Boolean deleted);

    List<CCAnswerEntity> findAllByDeleted(Boolean deleted);

    Long countByQuestionIdAndDeleted(Long questionId, Boolean deleted);
}
